package com.ssyt.hiring.web.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.ssyt.hiring.entity.ResumeEntity;
import com.ssyt.hiring.web.service.ResumeService;

@Controller
@Scope("prototype")
public class ResumeAction {

	@Autowired
	private ResumeService resumeService;
	private ResumeEntity resume;
	private int resumeId;

	/**
	 * 简历信息的删除
	 * 
	 * @return
	 */
	public String resumeDelete() {
		resumeService.resumeDelete(resumeId);
		return "getTalentResumeUI";

	}

	/**
	 * 简历的新增
	 * 
	 * @return
	 */
	public String resumeAdd() {
		resumeService.resumeAdd(resume);
		return "getTalentResumeUI";
	}

	/**
	 * 简历修改前查询
	 * 
	 * @return
	 */
	public String preResumeUpdate() {
		resume = resumeService.preResumeUpdate(resumeId);
		return "resumeUpdate";

	}

	public String resumeUpdate() {
		resumeService.resumeUpdate(resume);
		return "getTalentResumeUI";

	}

	public ResumeEntity getResume() {
		return resume;
	}

	public void setResume(ResumeEntity resume) {
		this.resume = resume;
	}

	public ResumeService getResumeService() {
		return resumeService;
	}

	public void setResumeService(ResumeService resumeService) {
		this.resumeService = resumeService;
	}

	public int getResumeId() {
		return resumeId;
	}

	public void setResumeId(int resumeId) {
		this.resumeId = resumeId;
	}

}
